package org.example.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo<T> {
    private String code;
    private String msg;
    private T data;

    public static ResultVo success(Object data){
        return new ResultVo("200",null,data);
    }

    public static ResultVo error(String msg){
        return new ResultVo("500",msg,null);
    }
}
